import numpy as np

a = [36, 39, 14, 48, 20, 13, 12, 15, 45, 41]
print(a)
b = list(filter(lambda x: x > 20, a))
print(b)

c = np.array(a)
print(c)
print(c[c > 20])
print(c > 20)
print('++++++++++++++++++++++++++++++++++++++++')
d = np.array([0, 1, 2, 3])
e = np.array([True, False, False, True])
print(e[d])
# 布尔值索引
print(d[e])
print('++++++++++++++++++++++++++++++++++++++++')
print(c[c > 20])
print(c[(c > 20) & (c % 2 == 0)])
print(c)
print(c[(c > 20) | (c % 2 == 0)])
